<?php

abstract class BlockMethod {

	protected $aParams;

	public function __construct(array $aParams = null) {

        $this->aParams = $aParams === null?
        	$this->getDefaultParams() :
        	array_merge($this->getDefaultParams(), $aParams)
        	;

	}

	protected function getParamByName($sName) {

        if(!isset($this->aParams[$sName])) {
            throw new Exception_RequiredParamNotFound($sName);
        }

		return $this->aParams[$sName];

    }

    protected function getDefaultParams() {

    	return array();

	}

	abstract public function run();

}

?>